package hu.mapro.flang.gwt.client.ui.custom;

import hu.mapro.flang.gwt.client.ui.UiMessages;
import hu.mapro.flang.gwt.domain.client.AutoBeans.ExerciseColumnBuilderDisplay;
import hu.mapro.flang.gwt.domain.client.AutoBeans.ExerciseColumnBuilderReference;
import hu.mapro.flang.gwt.domain.client.AutoBeans.ExerciseDefaultColumnModelCreator;
import hu.mapro.flang.gwt.domain.client.AutoBeans.ExerciseProxy;
import hu.mapro.gwtui.client.browser.grid.GridColumnCustomBuilder;

import com.google.inject.Inject;
import com.google.inject.Singleton;

@Singleton
public class CustomExerciseDefaultColumnModelCreator extends ExerciseDefaultColumnModelCreator {

	UiMessages uiMessages;
	
	@Inject
	public CustomExerciseDefaultColumnModelCreator(UiMessages uiMessages) {
		super();
		this.uiMessages = uiMessages;
	}
	
	@Override
	public void buildColumnModel(ExerciseColumnBuilderDisplay d,
			ExerciseColumnBuilderReference r,
			GridColumnCustomBuilder<ExerciseProxy> c) {
        c.addSuper();
        d.chapter().book().title().setLabel(uiMessages.titleOfBook());
        d.chapter().number();
        d.chapter().title();
        d.page().number();
        d.number().setLabel(uiMessages.numberOfExercise());
        d.description();
        d.data();	}

}